import { InsertDocModal } from '@app-cad-env/product/widgets/LeftPanel/modals/InsertDocModal';
import { useState } from 'react';

function InsertDoc({ onClose }) {
  const [insertDocModalOpen, setInsertDocModalOpen] = useState(true);
  return (
    <InsertDocModal
      open={insertDocModalOpen}
      onClose={() => {
        onClose();
        setInsertDocModalOpen(false);
      }}
    />
  );
}
export const cmdInsertDoc = {
  id: 'CmdInsertDoc',
  label: 'command.insert-part-or-product',
  icon: 'constraints/insert-part',
  create: (label: string, onClose: () => void) => (
    <InsertDoc onClose={onClose} />
  ),
};
